The present invention relates generally to an image processing apparatus and an image processing method that read from a memory device picture data constituted by color palette storage address and palette number data, selectively extract on the basis of the color palette storage address a color palette from among one or more color palettes stored in the memory device, and color a picture according to the extracted color palette for each piece of the palette number data.
For coloring picture data for display, a so-called color palette technique is used. A color palette is a table of color information consisting R (Red), G (Green), and B (Blue) each of which is made up of 8 bits, for example. The palette number of this color palette corresponds to one dot of picture information. The picture information specifies a palette number and the color information having the specified palette number is read from the color palette. This color information colors a picture for display.
With color palettes, if each of R, G, and B is made up of 8 bits, 256xc3x97256xc3x97256=16,777,216 colors can be expressed. Because one dot of picture information consists of 8 bits, 256 colors in these 16,777,216 colors can be represented on one display screen.
FIG. 1 shows one example of a related-art image processing apparatus for performing color processing on picture data by use of such color palettes as mentioned above. Referring to FIG. 1, reference numeral 101 denotes a CPU (Central Processing Unit), reference numeral 102 denotes a graphic display controller, and reference numeral 103 denotes a memory.
The memory 103 is provided with a storage area PIC101 for storing picture data. The picture data stored in the storage area PIC101 is represented by 8 bits per dot.
The graphic display controller 102 has a graphic data reading block 111 and a color palette register 112.
The picture data stored in the storage area PIC101 of the memory 103 is transferred to the graphic data reading block 111 over a bus 105. The color palette register 112 holds color palette data. The color palette register 112 performs color processing on the picture data stored in the graphic data reading block 111. The color-processed picture data is then sent to a display block 104 to be displayed thereon.
The picture data stored in the storage area PIC101 of the memory 103 is represented by 8 bits per dot as shown in FIGS. 2A and 2B. Namely, FIG. 2A shows the picture data equivalent to one screen, while FIG. 2B shows the picture data of one dot of the picture data shown on the screen. The one-dot picture data is represented by 8 data bits D0 through D7. The picture data represented by 8 bits per dot is transferred to the graphic data reading block 111 from the storage area PIC101 of the memory 103.
The color palette register 112 stores the color information of R, G, and B, each consisting of 8 bits, totaling to 24 bits. The 8-bit data D0 through D7 allocated to each picture data dot are related to the palette numbers of color palettes.
The color palette register 112 reads the color information of R, G, B according to the picture data stored in the graphic data reading block 111. This performs coloring processing on the picture data. The colored picture data is sent from the graphic controller 102 to the display block 104 to be displayed thereon.
Thus, use of the color palette technique can represent as many as 16 million colors by 8-bit dot information for example. Conventionally, however, of about 16 million colors represented by color palettes, only 256 colors can be displayed on one screen.
In the above-mentioned related-art graphic system, switching between color palettes requires to rewrite the information held in the color palette register 112. One color palette consists of 8 bits of R, G, B each and there are 256 palette numbers. Therefore, the quantity of information stored in the color palette register 112 amounts to 256xc3x978xc3x973=6,144 bits. This requires to rewrite all the information of 6,144 bits stored in the color palette register 112. This causes a problem of burdening the CPU when fast color palette switching is performed.
It is therefore an object of the present invention to provide an image processing apparatus and an image processing method that enhance the color representation performance on one display screen when performing coloring and displaying picture data by use of color palettes.
It is another object of the present invention to provide an image processing apparatus and an image processing method that perform fast switching between color palettes.
In carrying out the invention and according to one aspect thereof, there is provided an image processing apparatus comprising: graphic data reading means for reading picture data stored in a memory, separating a color palette storage address and palette number data from the picture data, outputting the color palette storage address, and temporarily storing the palette number data to be outputted; color palette storage address holding means for temporarily storing the color palette storage address outputted from the graphic data reading means; and color palette storage/control means for temporarily storing a color palette selectively taken, on the basis of the color palette storage address, from among a plurality of color palettes stored in the memory, reading color data corresponding to the temporarily stored color palette on the basis of the palette number data outputted from the graphic data reading means, and outputting the color data.
In carrying out the invention and according to another aspect thereof, there is provided an image processing apparatus comprising: storage means for storing picture data composed at least of a color palette storage address and palette number data and a plurality of color palettes; graphic data reading means for reading the picture data stored in the storage means, separating the color palette storage address and the palette number data from the picture data, outputting the color palette storage address, and temporarily storing the palette number data to be outputted; color palette storage address holding means for temporarily storing the color palette storage address outputted from the graphic data reading means; and color palette storage/control means for temporarily storing a color palette selectively taken, on the basis of the color palette storage address, from among the plurality of color palettes stored in the storage means, reading color data corresponding to the temporarily stored color palette on the basis of the palette number data outputted from the graphic data reading means, and outputting the color data.
In carrying out the invention and according to still another aspect thereof, there is provided an image processing method comprising the steps of: reading picture data from a memory; separating a color palette storage address and palette number data from said picture data; storing temporarily said color palette storage address and said palette number data; taking selectively a color palette, on the basis of said color palette storage address, from among a plurality of color palettes stored in said memory; holding temporarily said color palette; reading corresponding color data from said temporarily stored color palette for each piece of said temporarily stored palette number data; outputting said color data.